                        <td id="left"> <!-- must have tag td in this file, just change content of this tag-->
                            <!-- start left menu-->
                            <div id="leftmenu">
                                <img alt="Shop skincare products By Brand" src="<?php echo JS_PATH?>/skincarebyalana/images/shopByBrand.png"/>
                                
                                <!-- form -->
                                <div style="padding: 10px 0px">
                                    <!--form id="brandform" method="get" action="/servlet/Categories">
                                    <select id="brandDD"name="category" style="width: 130px; display: inline;">
                                        <option value="">select a brand</option>
                                        <option value="/*april-specials/">*April Specials</option>
                                        <option value="/*daily-clearance/">*Daily Clearance</option>
                                    </select>
                                    </form-->
                                </div>
                                <!-- end form-->

                                <?php
    $allCategory = $this->allCategory;

    $currentPage = 1;
    // get current node
    //$leftMenu = $allCategory[$currentPage];
    @$allParent = explode(',',$allCategory[$currentPage]['all_parent']);
    $allParent = is_array($allParent)?$allParent:array();
    $allParent[] = $this->currentPageID;

    //print_r($allParent);

    $objCat = new Category();
    
    if (count($allCategory) > 0) {




          $str = '<ul id="menu-left"  class="menu">';
		  $currenLevel = 1;
		  $first = true;
		  foreach ($allCategory as $row) {
		            if ($row['level'] == 1) {
		       if ($row['level'] <= $currenLevel && !$first) { // exit child
		        $str .= "</li>\r\n";
		       }
		       if ($row['level'] < $currenLevel && !$first) { // exit child
		        for ($x = 0; $x < $currenLevel - $row['level']; $x++) {
		         $str .= "</ul></li>\r\n";
		        }
		       }
		       if ($row['level'] > $currenLevel) { // has child
		        $str .= "  <ul>\r\n";
		       }

               $first = "";$endFirst= "";
               if($row['level'] == 1) {
                   //$first = "<span><img style=\"padding: 0px 5px 0px 10px;\" src=\"" . IMAGE_PATH . "/bullet_menu.gif\" alt=\"\"/>";
                   //$endFirst = "</span>";
               }

               $active = ($currentPage == $row['category_id'])?"active":"";
               if ($row['status']) {
                   if(in_array($row['category_id'], $allParent)) {
                        $str .= "<li class='selected'><a class='{$active} selected level" . $row['level'] . "' href='" . $objCat->url($row) ."'>" . $first . $row['admin_title'] . $endFirst . "</a>\r\n";
                   } else {
                        if ($row['left'] +1 != $row['right']) {
                            $str .= "<li><a class='level" . $row['level'] . "' href='" . $objCat->url($row) ."'>" . $first . $row['admin_title'] . $endFirst . "</a>\r\n";
                        } else {
                            $str .= "<li><a class='" . $row['level'] . "' href='" . $objCat->url($row) ."'>" . $first . $row['admin_title'] . $endFirst . "</a>\r\n";
                        }
                   }
               }
		       $currenLevel = $row['level'];
		       $first = false;
		            }
		  } // for

		  if (!$first) {
		   $str .= "</li>";
		   for ($x = 1; $x < $currenLevel; $x++) {
		    $str .= "</ul></li>\r\n";
		   }
		  }
		  $str .= "</ul>";
        echo $str;
    } // count left children
?>
                                

        </div> <!-- end left menu-->
        <div id="newsletterSmall">

            <form name="ccoptin" action="" target="_blank" method="post" style="margin-bottom:2;" title="sign up for free deals on skincare products">
            
            <input type="hidden" name="m" value="1101968623761" />
            
            <input type="hidden" name="p" value="oi" />
            
            <center>
            
            <table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
            
            <tr>
            
            <td align="center"><img src="<?php echo JS_PATH?>/skincarebyalana/images/signup_left.png" alt="Signup for our Newsletter" /></td>
            
            </tr>
            
            <tr>
            
            <td align="center"><input type="text" name="ea" id="emailSmall" value="-- enter email --" alt="-- enter email --" /></td>
            
            </tr>
            
            <tr><td height="10"></td></tr>
            
            <tr>
            
            <td align="right"><input type="submit" value=" " name="go" id="submit" /></td>
            
            </tr>
            
            <tr>
            
            <td align="left"><img src="<?php echo JS_PATH?>/skincarebyalana/images/safesubscribe_left.jpg" alt="" /></td>
            
            </tr>
            
            </table>
            
            </center>
            
            </form>

</div><!-- END NEWSLETTERSMALL -->
                        </td> <!-- must have tag td in this file-->